// 这个是用来干嘛的 就是给表单提供数据的
import { reactive } from 'vue'
import { RoleAddParams } from '@/api/role/roleModel'
export default function useBaseModel() {
  const rules = reactive({
    name: [{
      required: true,
      message: '请填写角色名称',
      trigger: 'blur',
    }],
    description: [{
      required: true,
      message: '请填写角色描述',
      trigger: 'blur',
    }],
    deptId: [{
      required: true,
      message: '请选择上级部门',
      trigger: 'blur',
    }],
  })
  const dialogModel = reactive<RoleAddParams>({
    deptId: '',
    description: '',
    id: '',
    name: '',
    state: '',
  })
  return {
    rules, dialogModel
  }
}